﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="containerQrCode.aspx.cs" Inherits="containerQrCode" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        .hiddenImg{display:none}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <div>输入</div> 
    <asp:TextBox ID="txtInput" runat="server" TextMode ="MultiLine" Height ="100px" Width ="300px"></asp:TextBox>
        <asp:Button ID="btn" runat="server" Text="转化二维码" onclick="btn_Click" />
        <asp:Label runat=server ID='result' style="color:Red;margin-top:30px"></asp:Label></br>
    <asp:Label runat=server ID='container' style="color:Red;margin-top:30px"></asp:Label>
    </div>
    </form>
     <asp:Image runat=server ID='qrcode' style="height:100%;width:450px"/>
     <div id="ImageList" runat=server></div>
     <input type=button value="上一个" onclick="showPre()"/>
     <input type=button value="下一个" onclick="showNext()"/>
     <input type=hidden value="1" id="CurrentIndex"/>
     <input type=hidden value="" id="Total" runat=server/>
</body>
<script src="/InSiteWebApplication/Content/Easyui/jquery.min.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/jquery.easyui.min.js" type="text/javascript"></script>
<script>
    function showPre() {
        var index = Number($('#CurrentIndex').val())
        if (index>1) {
            $('.Imgdiv_'+index).prev().removeClass('hiddenImg')
            $('.Imgdiv_' + index).addClass('hiddenImg');
            $('#CurrentIndex').val(index - 1)
        }
     }
     function showNext() {
         var index = Number($('#CurrentIndex').val());
         var total = Number($("#Total").val());
         if (index < total) {
             $('.Imgdiv_' + index).next().removeClass('hiddenImg')
             $('.Imgdiv_' + index).addClass('hiddenImg');
             $('#CurrentIndex').val(index+1)
         }
         }
</script>
</html>
